/*
 * @path        : \threejs\src\components\layout.js
 * @Author      : yvangod
 * @since       : 2021-04-02 17:19:48
 * @LastAuthor  : yvangod
 * @lastTime    : 2021-04-02 17:30:30
 * @message     : 走好每一步，才能走的更快更稳
 */
import 'normalize.css';
import '@/assets/styles/index.scss';
const menu = require('@/common/menu')

export function loadComponent(options) {
  const menuWrap = document.createElement("div")
  menuWrap.className = "project_menu"
  document.body.appendChild(menuWrap);

  if (menu) {
    menu.forEach(m => {
      const link = `<a href="/${m.name}.html">${m.title}</a>`
      const li = document.createElement("li")
      li.innerHTML = link;
      menuWrap.appendChild(li)
    })
  }

  const project_thumbnail_url = options.thumbnail;
  const project_thumbnail_content = `
  <img src="${project_thumbnail_url}" />
`;
  const project_thumbnail = document.createElement("div");
  project_thumbnail.className = "project_thumbnail";
  project_thumbnail.innerHTML = project_thumbnail_content;

  document.body.appendChild(project_thumbnail);

  const root = document.createElement("div");
  document.body.appendChild(root);

}
